﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
              string userName = Request.Params["TextBox1"];
              string password = Request.Params["TextBox2"];
              Label1.Text = $"欢迎你，{userName},密码:{password}";
              string userName1 = Request.QueryString["name"];
              string password1 = Request.QueryString["pass"];
              Label2.Text = $"欢迎你，{userName1},密码:{password1}";
            //string method=Request.HttpMethod;
            //if (method=="POST")
            //{
            //    string userName = Request.Params["TextBox1"];
            //    string password = Request.Params["TextBox2"];
            //    Label1.Text = $"欢迎你，{userName},密码:{password}";

            //}
            //else if (method == "GET")
            //{
            //    string userName1 = Request.QueryString["name"];
            //    string password1 = Request.QueryString["pass"];
            //    Label1.Text = $"欢迎你，{userName1},密码:{password1}";

            //}

        }
    }
}